﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using System.Threading.Tasks;

namespace CS.BLL
{
    public static class MD5Helper
    {
        public static string GetMd5String(string md5str)
        {
            MD5 md5 = MD5.Create();
            byte[] bytes= md5.ComputeHash(Encoding.UTF8.GetBytes(md5str));
            var sb=new StringBuilder();
            for (int i = 0; i < bytes.Length; i++)
            {
                sb.Append(bytes[i].ToString("x2"));

            }
            
            return sb.ToString().ToUpper();
        }
        
    }
}
